<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
// use Illuminate\Http\Response;
use App\Model\District;

class ShopController extends Controller
{

	public function Area()
	{
		// $upid = 0;
		// dd($upid);
		$upid = intval($_POST['upid']);
		// dd($upid);
		$data = District::select('id','name','upid')->where('upid', $upid)->get();
		// dd(json_encode($data));
		// echo $upid;
		$result = [
			'code' => 200,
			'msg'  => '成功',
			'data' => $data,
		];
		return json_encode($result);
	}
}
